package _5_Create._5_2_Builder._5_2_2_complete.Product;

import _5_Create._5_2_Builder._5_2_1_degenBuilder.MimeMessage;
import lombok.Data;

import java.util.Date;

/**
 * 产品模板类，提供一般实现，子类可以有自己的特殊实现
 */
@Data
abstract public class AutoMessage {
    protected String subject = "";
    protected String body = "";
    protected String from = "";
    protected String to = "";
    protected Date sendDate = null;

    public void send() {
        String smtpHost = "xzc.com";
        from = "xzc@qq.com";
        to = "someone@qq.com";
        MimeMessage message = new MimeMessage();
        message.setSubject(subject);
        Transpot.sendMail(message);
    }
}
